package com.itheima.es.pojo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

/**
 * @Author Administrator
 * @Date 2021/11/19:19:17
 * @Description:
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "people_index", shards = 1, replicas = 1)
public class People {

    @Id
    private Long id;

    @Field(type = FieldType.Keyword, index = true)
    private String name;
    @Field(type = FieldType.Text, index = true)
    private String address;
    @Field(type = FieldType.Integer, index = true)
    private int age;
}
